<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:82:"D:\wamp\www\A1-their\tp5\public/../application/index\view\Orderinfo\orderinfo.html";i:1528161286;s:76:"D:\wamp\www\A1-their\tp5\application\index\view\OrderPublic\orderpublic.html";i:1528141232;}*/ ?>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>订单管理</title>

		<link href="/static/home/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="/static/home/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

		<link href="/static/home/css/personal.css" rel="stylesheet" type="text/css">
		<link href="/static/home/css/orstyle.css" rel="stylesheet" type="text/css">

		<script src="/static/home/AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
		<script src="/static/home/AmazeUI-2.4.2/assets/js/amazeui.js"></script>

	</head>

	<body>
		<!--头 -->
		<header>
			<article>
				<div class="mt-logo">
					<!--顶部导航条 -->
					<div class="am-container header">
						
						<ul class="message-r">
							<?php if(!empty(\think\Session::get('uid'))): ?>
						     <div class="topMessage home"> 
						      <div class="menu-hd">
						       <a href="/home/index" class="h">商城首页</a>
						      </div> 
						     </div>

						     <div class="topMessage my-shangcheng"> 
						      <div class="menu-hd MyShangcheng">
						       <a target="_top" href="/orderinfo/grxx"><i class="am-icon-user am-icon-fw"></i>个人中心</a>
						      </div> 
						     </div>
						     
						     <div class="topMessage mini-cart"> 
						      <div class="menu-hd">
						       <a id="mc-menu-hd" href="/cart/index" target="_top" ><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h"></strong></a>
						      </div> 
						     </div>

						     <div class="topMessage favorite"> 
						      <div class="menu-hd">
						       <a href="/orderinfo/collection" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a>
						      </div> 
						     </div>
						     <?php endif; ?>
						</ul>
						</div>

						<!--悬浮搜索框-->

						<div class="nav white">
							<div class="logoBig" style="position:relative;top:-15px;right:100px;">
								<li><img src="/static/home/images/aishang.png" /></li>
							</div>

							<div class="search-bar pr">
								<a name="index_none_header_sysc" href=""></a>			
								<form action="/home/goods" method="post"> 
							      <input id="searchInput" name="search" type="text" placeholder="搜索" autocomplete="off" /> 
							      <input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit" /> 
							     </form> 
							</div>
						</div>

						<div class="clear"></div>
					</div>
				</div>
			</article>
		</header>
            <div class="nav-table">
					   <div class="long-title"><span class="all-goods">全部分类</span></div>
					   <div class="nav-cont">
							<ul>
								 <li class="index"><a href="/home/index">首页</a></li>
								  <?php if(is_array($brand) || $brand instanceof \think\Collection || $brand instanceof \think\Paginator): if( count($brand)==0 ) : echo "" ;else: foreach($brand as $key=>$bra): ?>
								      <li class="qc"><a href="/home/brand/id/<?php echo $bra['id']; ?>"><?php echo $bra['brand']; ?></a></li>
								  <?php endforeach; endif; else: echo "" ;endif; ?>
							</ul>
						    <div class="nav-extra">
						    	<i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
						    	<i class="am-icon-angle-right" style="padding-left: 10px;"></i>
						    </div>
						</div>
			</div>
			<b class="line"></b>
		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					

					<div class="user-order">

						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">订单管理</strong> / <small>Order</small></div>
						</div>
						<hr/>

						<div class="am-tabs am-tabs-d2 am-margin" data-am-tabs>

							<ul class="am-avg-sm-5 am-tabs-nav am-nav am-nav-tabs">
								<li class="am-active"><a href="#tab1">所有订单</a></li>
								<!-- <li><a href="#tab3">待发货</a></li>
								<li><a href="#tab4">待收货</a></li>
								<li><a href="#tab5">待评价</a></li> -->
							</ul>

							<div class="am-tabs-bd">
								<div class="am-tab-panel am-fade am-in am-active" id="tab1">
									<div class="order-top">
										<div class="th th-item">
											<td class="td-inner">商品</td>
										</div>
										<div class="th th-price">
											<td class="td-inner">单价</td>
										</div>
										<div class="th th-number">
											<td class="td-inner">数量</td>
										</div>
										<div class="th th-operation">
											<td class="td-inner">商品操作</td>
										</div>
										<div class="th th-amount">
											<td class="td-inner">合计</td>
										</div>
										<div class="th th-status">
											<td class="td-inner">交易状态</td>
										</div>
										<div class="th th-change">
											<td class="td-inner">交易操作</td>
										</div>
									</div>

									<div class="order-main">
										<div class="order-list">
											

											
											
											
									
											
											<?php if(is_array($info) || $info instanceof \think\Collection || $info instanceof \think\Paginator): if( count($info)==0 ) : echo "" ;else: foreach($info as $key=>$row): ?>
											<!--不同状态订单-->
											<div class="order-status3">
												<div class="order-title">
													<div class="dd-num">订单编号：<a href="javascript:;"><?php echo $row['ordernum']; ?></a></div>
													<span><?php echo $row['time']; ?></span>
													<!--    <em>店铺：小桔灯</em>-->
												</div>
												<div class="order-content">
													<div class="order-left">

													<?php if(is_array($row['pp']) || $row['pp'] instanceof \think\Collection || $row['pp'] instanceof \think\Paginator): if( count($row['pp'])==0 ) : echo "" ;else: foreach($row['pp'] as $key=>$rows): ?>
														<ul class="item-list">
															<li class="td td-item">
																<div class="item-pic">
																	<a href="#" class="J_MakePoint">
																		<img src="/uploads/<?php echo $rows['pic']; ?>" class="itempic J_ItemImg">
																	</a>
																</div>
																<div class="item-info">
																	<div class="item-basic-info">
																		<a href="#">
																			<p><?php echo $rows['goods_name']; ?></p>
																			<p class="info-little">
																				<?php echo $rows['descr']; ?>
																			</p>
																		</a>
																	</div>
																</div>
															</li>
															<li class="td td-price">
																<div class="item-price">
																	<?php echo $rows['price']; ?>
																</div>
															</li>
															<li class="td td-number">
																<div class="item-number">
																	<span>×</span><?php echo $rows['qty']; ?>
																</div>
															</li>
															<li class="td td-operation">
																<div class="item-operation">
																	<a href="refund.html">退款/退货</a>
																</div>
															</li>
														</ul>
														<?php endforeach; endif; else: echo "" ;endif; ?>

														

													</div>
													<div class="order-right">
														<li class="td td-amount">
															<div class="item-amount">
																合计：<?php echo $row['allprice']; ?>
																<p>含运费：<span>10.00</span></p>
															</div>
														</li>
														<div class="move-right">
															<li class="td td-status">
																<div class="item-status">
																	<p class="Mystatus"><?php switch($row['status']): case "0": ?>未发货<?php break; case "1": ?>已发货<?php break; case "2": ?>已收货<?php break; case "3": ?>取消中<?php break; case "4": ?>取消成功<?php break; case "5": ?>未发货<?php break; case "6": ?>未发货<?php break; case "7": ?>已评价<?php break; default: endswitch; ?>
																	</p>
																	<p class="order-info"><a href="/orderinfo/address/id/<?php echo $row['id']; ?>">订单详情</a></p>
																</div>
															</li>
															<li class="td td-change">
															<?php if($row['status']==1): ?>
																<a href=""><div class="am-btn am-btn-danger anniu shouhuo" name="<?php echo $row['id']; ?>"></a>
																	确认收货
																	</div>
																<div class="am-btn am-btn-success anniu quxiao" name="<?php echo $row['id']; ?>" style="margin-top:10px;">
																	取消订单
																	</div>
														<?php elseif($row['status']==0): ?>
																<div class="am-btn am-btn-danger anniu txfahuo" name="<?php echo $row['id']; ?>" >
																	提醒发货
																	</div>
																	<div class="am-btn am-btn-success anniu quxiao" name="<?php echo $row['id']; ?>" style="margin-top:10px;">
																	取消订单
																	</div>
														<?php elseif($row['status']==2): ?>
																<!--用户id=$row['user_id'] -->
																<a href="/orderinfo/doevaluate/orderid/<?php echo $row['id']; ?>"><div class="am-btn am-btn-danger anniu " name="<?php echo $row['id']; ?>" >
																	评价商品
																	</div></a>
																	<div class="am-btn am-btn-success anniu quxiao" name="<?php echo $row['id']; ?>" style="margin-top:10px;">
																	取消订单
																	</div>
														<?php elseif($row['status']==3): ?>
																	<div class="am-btn am-btn-success anniu" name="<?php echo $row['id']; ?>" style="margin-top:10px;">
																	取消中
																	</div>
														<?php elseif($row['status']==4): ?>
																	<div class="am-btn am-btn-success anniu" name="<?php echo $row['id']; ?>" style="margin-top:10px;">
																	取消成功
																	</div>
														<?php elseif($row['status']==5): ?>
																	<div class="am-btn am-btn-danger anniu" name="<?php echo $row['id']; ?>">
																	提醒中
																	</div>
																	<div class="am-btn am-btn-success anniu quxiao" name="<?php echo $row['id']; ?>" style="margin-top:10px;">
																	取消订单
																	</div>
														<?php elseif($row['status']==6): ?>
																	<div class="am-btn am-btn-danger anniu" name="<?php echo $row['id']; ?>">
																	提醒成功
																	</div>
																	<div class="am-btn am-btn-success anniu quxiao" name="<?php echo $row['id']; ?>" style="margin-top:10px;">
																	取消订单
																	</div>
															<?php elseif($row['status']==7): ?>
																<!--用户id=$row['user_id'] -->
																<a href="javascript:void(0);"><div class="am-btn am-btn-success anniu " name="<?php echo $row['id']; ?>" >
																	已评价
																	</div></a>
															<?php endif; ?>
															</li>
														</div>
													</div>
												</div>

											</div>

										<?php endforeach; endif; else: echo "" ;endif; ?>



										</div>

									</div>

								</div>
								
								


							</div>

						</div>
					</div>


<script>
	//确认收货
	$(".shouhuo").click(function(){
		ob=$(this);
		a=ob.attr("name");
		
		$.get("/orderinfo/queren",{a:a},function(data){
			 if(data==1){
			 	a=ob.parents("li").prev().find("div:eq(0)").find("p:eq(0)");
			 	a.html("已确认收货");
			 	ob.html("评价商品");	
			 }
		});
	})

	//取消订单
	$(".quxiao").click(function(){
		ob=$(this);
		a=ob.attr("name");
		//通过ajax更改状态
		$.get("/orderinfo/quxiao",{a:a},function(data){
			a=ob.parents("li").prev().find("div:eq(0)").find("p:eq(0)");
			a.html("取消中");
			ob.html("取消中");
			ob.prev().remove();


		})
	})
	//提醒发货
	$(".txfahuo").click(function(){
		ob=$(this);
		a=ob.attr("name");
		//通过ajax更改状态
		$.get("/orderinfo/txfahuo",{a:a},function(data){
			ob.html("提醒中");

		})
	})
</script>


				</div>
				<!--底部-->
				<div class="footer "> 
				     <div class="footer-hd "> 
				      <p> 
				          <span>友情链接</span> 
				        <?php if(is_array($links) || $links instanceof \think\Collection || $links instanceof \think\Paginator): if( count($links)==0 ) : echo "" ;else: foreach($links as $key=>$links): ?>
				          <a href="http://<?php echo $links['linksaddress']; ?>" target="_blank"><?php echo $links['linksname']; ?></a> <b>|</b>
				        <?php endforeach; endif; else: echo "" ;endif; ?> 
				      </p> 
				     </div> 
				     <div class="footer-bd "> 
				      <p> <a href="# ">关于爱上零食屋</a>&nbsp&nbsp&nbsp&nbsp&nbsp 
				      <a href="# ">合作伙伴</a>&nbsp&nbsp&nbsp&nbsp&nbsp  
				      <a href="# ">联系我们</a></p> 
				     </div> 
				    </div> 
   
			</div>
			<aside class="menu">
				<ul>
					<li class="person">
						<a href="/orderinfo/grxx">个人中心</a>
					</li>
					<li class="person">
						<ul>
							<li> <a href="/orderinfo/grxx">个人信息</a></li>
							<!-- <li> <a href="">安全设置</a></li> -->
							<li> <a href="/orderinfo/addressa">收货地址</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的交易</a>
						<ul>
						<!-- <li class="active"> -->
							<li><a href="/orderinfo/index">订单管理</a></li>
						</ul>
					</li>

					<li class="person">
						<a href="#">我的小窝</a>
						<ul>
							<li> <a href="/orderinfo/collection">收藏</a></li>
							<!-- <li> <a href="foot.html">足迹</a></li> -->
							<li> <a href="/orderinfo/evaluate/uid/<?php echo \think\Session::get('uid'); ?>">评价</a></li>
							<!-- <li> <a href="news.html">消息</a></li> -->
						</ul>
					</li>

				</ul>

			</aside>
		</div>

	</body>

</html>